<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<script type="text/javascript">
    /**
     * 会员金币流水详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/mallCoin/getMallCoinObject.sjson",
            data: {mallCoinId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                $("#d_serialNumber").html(data.serialNumber);
                $("#d_ordersNo").html(data.ordersNo);
                if(data.type==1){
                    $("#d_type").html("收入");
                }else if(data.type==2){
                    $("#d_type").html("支出");
                }else if(data.type==3){
                    $("#d_type").html("取消订单");
                }else if(data.type==4){
                    $("#d_type").html("交易作废");
                }
                $("#d_transactionNumber").html(data.transactionNumber);
                $("#d_remainingNumber").html(data.remainingNumber);
                $("#d_frozenNumber").html(data.frozenNumber);
                if(data.proportion>0){
                    $("#d_proportion").html(data.proportion+"%");
                }else{
                    $("#d_proportion").html(0);
                }
                if(data.tradeTime!=""&&data.tradeTime!=undefined){
                    $("#d_tradeTime").html(new Date(data.tradeTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                if(data.operatorTime!=""&&data.operatorTime!=undefined){
                    $("#d_operatorTime").html(new Date(data.operatorTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                $("#d_remarks").html(data.remarks);
            }
        });
    }
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">会员金币流水详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">流水号:</td><td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_serialNumber"></span></td>
						<td class="toright_td" width="150px">订单号:</td><td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_ordersNo"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">类型:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_type"></span></td>
						<td class="toright_td" width="150px">交易数量:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_transactionNumber"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">冻结数量:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_frozenNumber"></span></td>
						<td class="toright_td" width="150px">当时分享比例:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_proportion"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">交易时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_tradeTime"></span></td>
						<td class="toright_td" width="150px">操作时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_operatorTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">备注:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_remarks"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
